package adapter;

import adapter.adapter.AdapterPower12;
import adapter.adapter.AdapterPower12Ext;
import adapter.power.v12.IPower12;
//import adapter.power.v12.Power12;
import adapter.power.v220.Power220;

public class AdapterClient {

	public static void main(String[] args) {
		Power220 power220 = new Power220();
		power220.output220v();

		// Power12 power12 = new Power12();
		// power12.output12v();

		// 对象适配器
		System.out.println("\n电源适配器转换中....");
		IPower12 adapterPower12 = new AdapterPower12(power220);
		adapterPower12.output12v();
		System.out.println("\n电源适配器转换结束....");

		// 类适配器
		System.out.println("\n电源适配器转换中....");
		IPower12 adapterPower12Ext = new AdapterPower12Ext(power220);
		adapterPower12Ext.output12v();
		System.out.println("\n电源适配器转换结束....");

	}

}
